<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table cellspacing="0" border="0" width="995">
	<tr>
		<td width="995" class="title_manager_product">Quản lý tin tức</td>
	</tr>
	<tr>
		<td>
			<table border="0" cellpadding="0" cellspacing="0" width="995">
				<tr>
					<td align="center">
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td align="center"><a href="index.php?admin=newAdmin&do=formaddnews"><img src="images/CreateNews.gif" width="48" height="47" border="0" /></a></td>
							</tr>
							<tr>
								<td align="center" class="title_new_add"><a href="index.php?admin=newAdmin&do=formaddnews">Thêm tin tức</a></td>
							</tr>
						</table>
						
					</td>
					
					<td align="center">
						<table border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td align="center"><a href="index.php?admin=newAdmin&do=formaddnewtype"><img src="images/CreateCategory.gif" width="51" height="48" border="0" /></a></td>
							</tr>
							<tr>
								<td align="center" class="title_new_add"><a href="index.php?admin=newAdmin&do=formaddnewtype">Thêm kiểu tin tức</a></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>	
	</tr>
</table>
<table cellspacing="0" border="0" width="995">
	<tr>
		<td width="200" valign="top">					
			<?php
				include("menuleftnew.php");
			?>
		</td>	
		<td width="790" valign="top">
			<table cellspacing="0" border="0" width="790">
				<tr>
				<?php
					$id=$_GET['id'];					
					$querycat="SELECT * FROM news WHERE id=$id";
					$resultcat=mysql_query($querycat) or die(mysql_error());
					while($rowscat = mysql_fetch_array($resultcat)){?>
					<td width="790" class="title_manager_cate"><?php echo $rowscat['titleNew'];?></td>
				<?php
				}
				?>	
				</tr>
			</table>
			
			<table cellspacing="0" cellpadding="0" border="0" width="790">
				<tr>
					<td>
						<table class="reference" cellspacing="0" cellpadding="0" border="0" width="790">
							<tr>
								<th class="listgrouptitle"><b>ID</b></th>
								<th class="listgrouptitle"><b>Ảnh</b></th>
								<th class="listgrouptitle"><b>Tiêu đề</b></th>
								<th class="listgrouptitle"><b>Mô tả tin</b></th>
								<th class="listgrouptitle"><b>Trạng thái</b></th>
								<th class="listgrouptitle"><b>Chức năng</b></th>
							</tr>
							
								<?php
									$id=$_GET['id'];
									$query="SELECT * FROM newdetails WHERE newID=$id";
									$result=mysql_query($query) or die(mysql_error());
									while($rows=mysql_fetch_array($result)){?>
									<tr>
										<td><?php echo $rows['id'];?></td>
										<td><img src="<?php echo $rows['newImage'];?>" width="60" height="60"></td>
										<td><?php echo $rows['newName']?></td>
										<td><?php echo $rows['newDetail'];?></td>
										<td><?php echo $rows['state'];?></td>
										<td align="center">
											<a href="index.php?admin=newAdmin&do=formeditnews&id=<?php echo $rows['id'];?>" title="Sửa"><img src="images/edit.gif" width="17" height="17" border="0" /></a>
											<a href="index.php?admin=newAdmin&do=deletefile&id=<?php echo $rows['id'];?>" onclick="return confirm('Bạn có muốn xoá tin này không?');" title="Xóa"><img src="images/delete.gif" width="17" height="17" border="0" /></a>                        
										</td> 
									</tr>
								<?php
								}
								?>    
							
						</table>
					</td>
				</tr>				
			</table>
		</td>
	</tr>	
</table>
</body>
</html>